package com.ruoyi.voucher.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.TreeEntity;

import javax.validation.constraints.NotBlank;

/**
 * 会计科目对象 subject
 * 
 * @author sfk
 * @date 2025-02-26
 */
public class Subject extends TreeEntity
{
    private static final long serialVersionUID = 1L;

    /** 科目ID */
    @Excel(name = "科目ID")
    private Long subjectId;

    /** 科目编码 */
    @Excel(name = "科目编码")
    private String subjectCode;

    /** 科目名称 */
    @Excel(name = "科目名称")
    @NotBlank(message = "科目名称不能为空")
    private String subjectName;

    /** 科目类型 */
    @Excel(name = "科目类型")
    private Long typeId;

    /** 余额方向（0-借方 1-贷方） */
    @Excel(name = "余额方向", readConverterExp = "0=-借方,1=-贷方")
    private Integer balanceDirection;

    /** 辅助核算项 */
    @Excel(name = "辅助核算项")
    private String auxiliaryItems;

    /** 启用状态 */
    @Excel(name = "启用状态")
    private Integer isEnabled;

    private String createBy;

    /** 逻辑删除 */
    private Integer isDeleted;

    public void setSubjectId(Long subjectId) 
    {
        this.subjectId = subjectId;
    }

    public Long getSubjectId() 
    {
        return subjectId;
    }
    public void setSubjectCode(String subjectCode) 
    {
        this.subjectCode = subjectCode;
    }

    public String getSubjectCode() 
    {
        return subjectCode;
    }
    public void setSubjectName(String subjectName) 
    {
        this.subjectName = subjectName;
    }

    public String getSubjectName() 
    {
        return subjectName;
    }
    public void setTypeId(Long typeId) 
    {
        this.typeId = typeId;
    }

    public Long getTypeId() 
    {
        return typeId;
    }
    public void setBalanceDirection(Integer balanceDirection) 
    {
        this.balanceDirection = balanceDirection;
    }

    public Integer getBalanceDirection() 
    {
        return balanceDirection;
    }
    public void setAuxiliaryItems(String auxiliaryItems) 
    {
        this.auxiliaryItems = auxiliaryItems;
    }

    public String getAuxiliaryItems() 
    {
        return auxiliaryItems;
    }
    public void setIsEnabled(Integer isEnabled) 
    {
        this.isEnabled = isEnabled;
    }

    public Integer getIsEnabled() 
    {
        return isEnabled;
    }
    public void setIsDeleted(Integer isDeleted) 
    {
        this.isDeleted = isDeleted;
    }

    public Integer getIsDeleted() 
    {
        return isDeleted;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("subjectId", getSubjectId())
            .append("subjectCode", getSubjectCode())
            .append("subjectName", getSubjectName())
            .append("typeId", getTypeId())
            .append("balanceDirection", getBalanceDirection())
            .append("auxiliaryItems", getAuxiliaryItems())
            .append("isEnabled", getIsEnabled())
            .append("parentId", getParentId())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("isDeleted", getIsDeleted())
            .toString();
    }
}
